Management of intelligent data assignments for database systems with multiple processing units

ABSTRACT

Data of a database (e.g., database tables) can be reassigned from a first map to a second map in a database system that uses maps to assign data for processing to multiple processing units of a database system in accordance with one or more distributions schemes. Data portions can be selected in groups and moved in the selected groups in an efficient manner. The selection and/or movement of the data portions can be automated without requiring input for users of database systems.

CROSS REFERENCE TO THE RELATED APPLICATIONS

This application take priority form the Provisional U.S. PatentApplication No. 62/272,606, entitled: “AUTOMATED MANAGMENT OFINTELLEGENT DATA ASSIGNMENT FOR DATABASE SYSTEMS,” by Louis MartinBurger et al., filed on Dec. 29, 2015, which is hereby incorporatedherein by references for all purposes.

This application also take priority form the Provisional U.S. PatentApplication No. 62/272,639, entitled: “MANAGMENT OF SPARSE DATA FORINTELLEGENT DATA ASSIGNMENT FOR DATABASE SYSTEMS,” by Frederick S.Kaufman et al., also filed on Dec. 29, 2015, which is also herebyincorporated herein by references for all purposes.

This application also take priority form the Provisional U.S. PatentApplication No. 62/272,647, entitled: “ASSIGNMENT OF DATA FORINTELLEGENT DATA PROCESSING IN DATABASE SYSTEMS,” by Frederick S.Kaufman, also filed on Dec. 29, 2015, which is also hereby incorporatedherein by references for all purposes.

This application also take priority form the Provisional U.S. PatentApplication No. 62/272,658, entitled: “MOVER TIME LIMIT FOR INTELLEGENTDATA PROCESSING IN DATABASE SYSTEMS,” by Donald Raymond Pederson, alsofiled on Dec. 29, 2015, which is also hereby incorporated herein byreferences for all purposes.

This application is also a Continuation In Part (CIP) of, and takepriority from, the U.S. patent application Ser. No. 14/696,711, by JohnMark Morris, filed on Apr. 27, 2015, which takes priority from theProvisional U.S. Patent Application No. 62/088,862, entitled: “MAPINTELLIGENCE FOR MAPPING DATA TO MULTIPLE PROCESSING UNITS OF DATABASESYSTEMS,” by John Mark Morris, filed on Dec. 8, 2014, both of which arehereby incorporated by references herein for all purposes.

Accordingly, this application take the earliest priority form theProvisional U.S. patent from the Provisional U.S. Patent Application No.62/088,862, entitled: “MAP INTELLIGENCE FOR MAPPING DATA TO MULTIPLEPROCESSING UNITS OF DATABASE SYSTEMS,” by John Mark Morris, filed onDec. 8, 2014.

BACKGROUND

Data can be an abstract term. In the context of computing environmentsand systems, data can generally encompass all forms of informationstorable in a computer readable medium (e.g., memory, hard disk). Data,and in particular, one or more instances of data can also be referred toas data object(s). As is generally known in the art, a data object can,for example, be an actual instance of data, a class, a type, or aparticular form of data, and so on.

Generally, one important aspect of computing and computing systems isstorage of data. Today, there is an ever increasing need to managestorage of data in computing environments. Databases provide a very goodexample of a computing environment or system where the storage of datacan be crucial. As such, to provide an example, databases are discussedbelow in greater detail.

The term database can also refer to a collection of data and/or datastructures typically stored in a digital form. Data can be stored in adatabase for various reasons and to serve various entities or “users.”Generally, data stored in the database can be used by one or more the“database users.” A user of a database can, for example, be a person, adatabase administrator, a computer application designed to interact witha database, etc. A very simple database or database system can, forexample, be provided on a Personal Computer (PC) by storing data (e.g.,contact information) on a Hard Disk and executing a computer programthat allows access to the data. The executable computer program can bereferred to as a database program, or a database management program. Theexecutable computer program can, for example, retrieve and display data(e.g., a list of names with their phone numbers) based on a requestsubmitted by a person (e.g., show me the phone numbers of all my friendsin Ohio).

Generally, database systems are much more complex than the example notedabove. In addition, databases have been evolved over the years and areused in various business and organizations (e.g., banks, retail stores,governmental agencies, universities). Today, databases can be verycomplex. Some databases can support several users simultaneously andallow them to make very complex queries (e.g., give me the names of allcustomers under the age of thirty five (35) in Ohio that have bought allthe items in a given list of items in the past month and also havebought a ticket for a baseball game and purchased a baseball hat in thepast 10 years).

Typically, a Database Manager (DBM) or a Database Management System(DBMS) is provided for relatively large and/or complex databases. Asknown in the art, a DBMS can effectively manage the database or datastored in a database, and serve as an interface for the users of thedatabase. For example, a DBMS can be provided as an executable computerprogram (or software) product as is also known in the art.

It should also be noted that a database can be organized in accordancewith a Data Model. Some notable Data Models include a Relational Model,an Entity-relationship model, and an Object Model. The design andmaintenance of a complex database can require highly specializedknowledge and skills by database application programmers, DBMSdevelopers/programmers, database administrators (DBAs), etc. To assistin design and maintenance of a complex database, various tools can beprovided, either as part of the DBMS or as free-standing (stand-alone)software products. These tools can include specialized Databaselanguages (e.g., Data Description Languages, Data ManipulationLanguages, Query Languages). Database languages can be specific to onedata model or to one DBMS type. One widely supported language isStructured Query Language (SQL) developed, by in large, for RelationalModel and can combine the roles of Data Description Language, DataManipulation Language, and a Query Language.

Today, databases have become prevalent in virtually all aspects ofbusiness and personal life. Moreover, usage of various forms ofdatabases is likely to continue to grow even more rapidly and widelyacross all aspects of commerce, social and personal activities.Generally, databases and DBMS that manage them can be very large andextremely complex partly in order to support an ever increasing need tostore data and analyze data. Typically, larger databases are used bylarger organizations, larger user communities, or device populations.Larger databases can be supported by relatively larger capacities,including computing capacity (e.g., processor and memory) to allow themto perform many tasks and/or complex tasks effectively at the same time(or in parallel). On the other hand, smaller databases systems are alsoavailable today and can be used by smaller organizations. In contrast tolarger databases, smaller databases can operate with less capacity.

A current popular type of database is the relational database with aRelational Database Management System (RDBMS), which can includerelational tables (also referred to as relations) made up of rows andcolumns (also referred to as tuples and attributes). In a relationaldatabase, each row represents an occurrence of an entity defined by atable, with an entity, for example, being a person, place, thing, oranother object about which the table includes information.

One important objective of databases, and in particular a DBMS, is tooptimize the performance of queries for access and manipulation of datastored in the database. Given a target environment, an “optimal” queryplan can be selected as the best option by a database optimizer (oroptimizer). Ideally, an optimal query plan is a plan with the lowestcost (e.g., lowest response time, lowest CPU and/or I/O processing cost,lowest network processing cost). The response time can be the amount oftime it takes to complete the execution of a database operation,including a database request (e.g., a database query) in a given system.In this context, a “workload” can be a set of requests, which mayinclude queries or utilities, such as, load that have some commoncharacteristics, such as, for example, application, source of request,type of query, priority, response time goals, etc.

Today, database systems with multiple processing nodes can be veryeffective for storing and processing data. For example, in a multi-nodedatabase system, each node can be provided with one or more processingunits. A processing unit in a node can be provided with one or morephysical processors that each support one or more virtual processors.Each node of a multi-node database system can, for example, have its ownstorage for storing data of the database. Generally, data stored in adatabase can be assigned for storage and/or processing to a processingunit or to a node of the database system. Ideally, data should bedistrusted between the nodes and/or processing units in an effectivemanner and database queries should be processed in a manner that wouldallow effective use of all of the nodes and/or processing units of themulti-node database system to extend possible or needed.

In view of the prevalence of databases, especially, those with multipleprocessing units, in various aspects of commerce and general life today,it is apparent that database systems with multiple processing units arevery useful.

SUMMARY

Broadly speaking, the invention relates to computing environments andsystems. More particularly, the invention relates to database systems.

In accordance with one aspect, distinct data portions (e.g., databasetables) can be reassigned from a first map to a second map. It should benoted that first map can assign each one of the distinct data portionsto one or more multiple processing units of a database system forprocessing in accordance with one or more distributions schemes.

In accordance with one embodiment, a computer-implemented method ofreassigning data portions can select a set of the distinct data portionsassigned to the first map for assignment to the second map as selecteddata portions, and determine at least one reassigning group for theselected data portions. A reassigning group can identify two or more ofthe selected data portions from the first map for reassigned together tothe second map as a group.

Other aspects and advantages of the invention will become apparent fromthe following detailed description, taken in conjunction with theaccompanying drawings, illustrating by way of example the principles ofthe invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be readily understood by the followingdetailed description in conjunction with the accompanying drawings,wherein like reference numerals designate like structural elements, andin which:

FIG. 1A depicts an Intelligent (or open or robust) Mapping System (IMS)in a database environment in accordance with one embodiment.

FIG. 1B depicts a method for processing data of a database by a databasesystem that includes multiple processing units (or processing modules)in accordance with one embodiment.

FIG. 2 depicts an exemplary MAP that associates or assigns data tobuckets and AMPS in accordance with one embodiment.

FIG. 3 depicts one or more maps provided for one or more tables inaccordance with one embodiment.

FIG. 4 depicts maps that effectively assign data of a database,including tables, to buckets and AMPS for various applications inaccordance with one embodiment.

FIG. 5 depicts maps that can effectively assign data of a database,including specific data components (e.g., tables) to containers (e.g.,buckets) and processing units (e.g., AMPS) for various applications andin consideration of desired platforms in accordance with one embodiment.

FIG. 6 depicts a table that can be effectively assigned to multiple mapsfor various purposes and/or applications in accordance with oneembodiment.

FIG. 7 depicts maps that can have various states (e.g., active,inactive, on-line, offline) where the maps can be associated with asingle table or a set of tables in accordance with one embodiment.

FIG. 8 depicts merger of two maps (Map 1 and Map 2) that are partiallyoffline to form a map (Map 3) that can then be brought in its entiretyor completely online in accordance with one embodiment.

FIG. 9 depicts processing units (e.g., parallel processing units) thatcan be online or offline at a given time in accordance with oneembodiment.

FIG. 10 depicts disjoint maps associated with different pools ofprocessing units (e.g., Parallel AMP units in a multi-node databasesystem) in accordance with one embodiment.

FIG. 11 depicts storage of tables in disjoint maps in accordance withone embodiment.

FIG. 12 depicts a map-aware optimizer configured to use multiple maps(Map₁-Map_(n)) that are associated with one or more tables in order tooptimize processing of database queries relating to the one or moretables in a database system that stores the one or more tables inaccordance with one embodiment.

FIG. 13 depicts processing of database queries associated with one ormore tables in tandem (tandem queries) in accordance with oneembodiment.

FIG. 14 depicts exemplary features associated with maps that can beprovided in accordance with one or more embodiments.

FIG. 15 depicts an exemplary architecture for one database node 11051 ofthe DBMS 100 in accordance with one embodiment.

FIGS. 16 and 17 depict a parser in accordance with one embodiment.

FIG. 18 depicts an Intelligent Mapping System (IMS) in a databaseenvironment in accordance with another embodiment.

FIG. 19 depicts a map management method for reassignment of data fromone map to another map in a database system in accordance with anotherembodiment.

FIGS. 20A-H depict additional exemplary tables and exemplary scripts inaccordance with one or more embodiments.

DETAILED DESCRIPTION

As noted in the background section, database systems with multipleprocessing units are very useful. Generally, database systems withmultiple processing units need to assign data to their processing unitsfor processing. Typically, the data being assigned is associated withdatabase queries being processed by the database system. Ideally, datashould be assigned to the processing units in an efficient manner toeffectively allow them to work together at the same time to extentpossible or needed.

Conventionally, data can be assigned to the processing units of adatabase system by using a hashing technique, as generally known in theart. However, hashing may not be an ideal solution for every situation.Generally, different assignments strategies may be more effective as onestrategy may work better than the other in a given situation. Forexample, an assignment strategy used for larger tables may not be idealfor smaller tables, or vice versa. As such, there is a need for improvedtechniques for assignment of data for processing by the processing unitsof database systems with multiple processing units.

It will be appreciated that data can be assigned to processing units ofa database system with multiple processing in accordance with oneaspect. The assignment of data to the processing units can be referredto herein as mapping data. As such, a data map (or a map) can be usedfor assigning data to processing units of a database system withmultiple processing in accordance with one embodiment. In other words,maps (or other suitable mechanism or effectively assigning data) can beprovided as a more effective solution for assigning data to theprocessing units of database systems that can operate with multipleprocessing units. Generally, a map can be used to assign data to theprocessing units for processing, virtually in any desired manner (e.g.,virtually any desired function). By way of example, maps can associatedata to containers (e.g., buckets) and associate the containers toprocessing units of database system with multiple processing units inaccordance with one embodiment.

In accordance with another aspect, multiple assignments (e.g., multiplemaps) can be provided for assignment of the same data. In accordancewith yet another aspect, multiple assignment (e.g., multiple maps) canhave various states (e.g., active, inactive). It will also beappreciated that the (data assignments) (e.g., maps can be used toprovide additional benefits, including, for example, fault resiliency,query optimization, elasticity. Also, it will be appreciated that dataassignments (e.g., maps) can better facilitate implementation of desiredapplication and/or environments, including, for example, software onlyand Cloud, Commodity, and Open Environments, as well as, Open,Purpose-Built, or Multi-Platforms.

Embodiments of these aspects of the invention are also discussed belowwith reference to FIGS. 1-20H. However, those skilled in the art willreadily appreciate that the detailed description given herein withrespect to these figures is for explanatory purposes as the inventionextends beyond these limited embodiments.

FIG. 1A depicts an Intelligent (or open or robust) Mapping System (IMS)102 in a database environment 100 in accordance with one embodiment.Generally, the IMS 102 can be associated with a database 101 configuredto store data 108, for example, in various storage devices, including,volatile (e.g., memory) and non-volatile storage devices (e.g., HDD's,SSD) (not shown). Referring to FIG. 1A, the IMS 102 can, for example, beprovided as a part (or a component) of a database system (e.g., adatabase management system) 104 that may include and/or be operativelyconnected to a plurality of processing units (A and B). Those skilled inthe art will readily know that each one the processing units A and Bcan, for example, include one or more physical processors (e.g., CPUs).The processing units (or processing modules) A and B, can, for example,be part of two different nodes or the same node of a multi-node databasesystem that includes the database system 104. Also, as those skilled inthe art will readily appreciate, the IMS 102 can be provided usinghardware and/or software components. For example, IMS 102 can beprovided, in part, or entirely, as computer executable code stored in anon-transitory computer readable storage medium (e.g., volatile ornon-volatile memory) (not shown). It should be noted that the IMS 102can also be provided as a separate component that may or may notinteract with the database system 104.

In any case, it will be appreciated that IMS 102 can effectively assign(or associate) multiple distinct portions of the data 108 of thedatabase 101 (e.g., D1, D2, D3) to one or more of the multipleprocessing units A and B of the database system 102 for processing. Indoing so, the IMS 102 can effectively use a map (or a mapping scheme)provided as mapping data (or a map) M that associates multiple distinctportions of the data D of the database to multiple distinct datacontainers (or “containers”) C (e.g., C1, C2, C3 and C4). The map M canalso associate each one the multiple distinct containers C forprocessing to one or more of the multiple processing unit A and B of thedatabase system 102. As such, the map M can, for example, be provided asinput to the IMS 102. As those skilled in the art will readilyappreciate, the IMS 102 may also be configured used to create, storeand/or maintain the map M. As such, the map M can be provided as a partof the IMS 102. Generally, the map M can be stored in a non-volatile orvolatile storage. Typically, it would be more useful to store Map M innon-volatile storage so that the mapping information can be preserved.The map M can, for example, be provided at least in part by a human(e.g., database administrator). As such, the IMS 102 may also beconfigured to interface or interact with a user (e.g., a human, adatabase administrator, an application program) in order to createand/or maintain the map M.

Referring to FIG. 1A, map (or mapping data) M can be represented bymultiple individual mappings (or maps) M1, M2, M3 and M4, such that eachone of the mappings associates or assigns one or more distinct portionsof the data 108 of the database 101 (e.g., D1, D2, D3) to one or more ofthe multiple processing units A and B of the database system 102. Indoings, the distinct portions of the data 108 can be mapped to distinctcontainers C that can, in turn, be mapped to the processing units A andB for processing.

It will also be appreciated that that unlike conventional techniques,the distinct portions of the data 108 of the database 101 (e.g., D1, D2,D3) need not be assigned or associated to the processing units A and Bof the database system 104 for processing, using only a hashing scheme.In other words, the map M can allow virtually any type of assignmentand/or association to be made between the data portions and processingunits of the database system 104. For example, referring to FIG. 1A, adatabase table D2, in its entirety, can be mapped as data D2 to at leastone container C2. As another example, a round-robin technique can beused to map multiple distinct portions of the data 108 of the database101 to multiple distinct containers, for example, such that data portionD1 is mapped to the container C1, the data portion D2 is mapped to acontainer C2, and so on (shown in FIG. 1A). As yet another example,referring again to FIG. 1A, the same portion of data (D1) of thedatabase 101 can be mapped to multiple containers (C1 and C4). In otherwords, copies or logical copies of the same distinct data portions(e.g., logical copies D1 and D1′ of the same distinct data) can becoexist and can be effectively mapping to different containers usingdifferent maps. As an another example, data D1 and D3 can also both bemapped to the container C3, and so on. Although not shown in FIG. 1A, itshould be noted that each one of the individual maps (m1, m2, m3 and m4)can also map the containers C1, C2, C3 and C4 to the processing units Aand B. Alternatively, one or more of the containers C1, C2, C3 and C4can be mapped to the processing units A and B using additional mappinginformation (e.g., a set of map that are separate from maps m1, m2, m3and m4. In any case, as mapping data, map M can effectively map the dataportions to the processing units virtually in any desired manner.

In view of the foregoing, it is apparent that the map M and IMS 102 canprovide and use an open, robust and intelligent mapping system for thedatabase 101 where the mapping of data to the processing units A and Bof the database system 102 need not be limited to hashing schemes. Aswill be discussed in greater detail, the map data M and IMS 102 canprovide additional significant benefits, including, for example, faultresiliency, elasticity, and optimization of queries. In addition, themap data M and IMS 102 can provide a more suitable environment, forexample, for implementations of various desired environments orapplications, including, for example, “Cloud,” “Commodity”, “Open” and“Software Only” platforms or models.

As will also be discussed in greater detail, query optimization can bedone by considering maps in the map data M. Also, the maps in the mapdata M need not be independent on a specific platform and/or hardware.Furthermore, the IMS 102 can perform various map related operations,including, for example, creating new maps, deleting maps, growing a map,shrinking a map, merging maps, separating or dividing a map intomultiple maps, activating (or bringing online) a map and deactivating(bringing offline) a map. For example, IMS can facilitate creation ofnew maps for new data and/or new processing units, as data becomesavailable for storage in the database 101 and/or as new processing unitsare added to the database system 102. Similarly, old maps pertaining todata no longer needed or to be deleted from the database 101 and/or oldmaps pertaining to processing units that are to be removed from thedatabase system 102 can be deleted. As another example, maps can becomeactive or inactive during a reconfiguration process in a dynamic mannerallowing the database system 102 to still operate with a set of activemaps.

By way of example, one or more of the containers C can be provided asone or more “buckets” (e.g., conventional buckets as generally known inthe art) and the processing units (1-N) can be provided by using one ormore physical processors or virtual processors, for example, as one ormore virtual processors (e.g., an “Access Module Processer” (AMP))running on one or more physical processors, such as AMPs provided in aTeradata Active Data Warehousing System as will be known to thoseskilled in the art. As such, a Map M can, for example, effectivelyassociate or assign data D to buckets and also associate or assign AMP's(or AMPS) in accordance with embodiment.

FIG. 1B depicts a method 150 for processing data of a database by adatabase system that includes multiple processing units (or processingmodules) in accordance with one embodiment. It should be noted that eachone of the processing units can be configured to process at least aportion of data of the database, by using one or more physicalprocessors. Method 150 can, for example, be performed by the IMS 101(shown in FIG. 1A) or more generally, a database system configured formultiple processing units. Referring to FIG. 1B, initially, at least onemap is obtained (e.g., stored, accessed, determined, generated) 152. Themap at least associates multiple distinct portions of data of thedatabase to multiple distinct containers. The map also associates ateach one the multiple distinct containers to one or more of the multipleprocessing units for processing. Next, at least partially based on themap, one or more of the multiple distinct portions of the data isassigned (152) to one or more of the multiple processing units forprocessing.

To elaborate further, FIG. 2 depicts an exemplary MAP M that associatesor assigns data to buckets and AMPS in accordance with one embodiment.Referring to FIG. 2, data can be assigned to buckets using varioustechniques, including, for example, hashing, adaptive round robin, aswell as virtually any other desired function or assignment. For example,a function or assignment can be defined that associates a particulardata component or type (e.g., a database table) to a bucket. Similarly,buckets can be assigned using various techniques, including, forexample, hashing, adaptive round robin, as well as virtually any otherdesired function or assignment.

Generally, a map M (shown in FIG. 1A) can effectively assign aparticular type of data or data component of databases to a container(e.g., a bucket) in various ways without virtually any limitations. Oneexample of a particular type of data or data component that is currentlyprevalent in databases is a database table (or “table”). As such, tableswill be used as an example to further elaborate on how a map M can beeffectively used to assign data for various purposes.

FIG. 3 depicts one or more maps provided for one or more tables inaccordance with one embodiment. Referring to FIG. 3, a map can beprovided for one or more tables in consideration of variousapplications, purposes and/or advantages (e.g., optimization of databasequeries, fault resiliency, elasticity, “software-only” applications).One example is a map-aware optimizer that uses various maps defined fora table, or a set of tables, in order to facilitate optimization of theexecution and/or processing of database queries relating to the one ormore tables. Another example, would be fault resiliency, where multiplemaps can, for example, allow a database query to be processed and/orexecuted using one or more alternative maps that effectively provide oneor more alternative paths for processing and/or execution of thedatabase quires of database system in case a point in the databasesystem fails (e.g., a node in a multi-node database system fails). Yetas another example, a map can be used to provide elasticity, whereby,maps can be used to allow growth and reductions of tables in a dynamicmanner without having to shut down a database system. For example, oneor more tables can be expanded or reduced by using an alternative mapthat effectively replaces the old map. Still another example is a“software only” application, where maps, for example, allow assignmentof tables in consideration of Cloud, Commodity and Open Platformenvironments, where no specific hardware or platform limitations (e.g.,a Raid, Shared Array) need to be made to define maps.

In other words, a map M (shown in FIG. 1A) can effectively assign aparticular type of data or data component of a database to a container(e.g., a bucket) in various ways without virtually any limitations. Oneexample of a particular type of data or data component that is currentlyprevalent in databases is a database table (or “table”). As such, tableswill further be used as an example to further elaborate on how a map Mcan be effectively used to assign data for various purposes.

FIG. 4 depicts maps that effectively assign data of a database,including tables, to buckets and AMPS for various applications inaccordance with one embodiment. In this example, AMPS can be assigned inconsideration of Open platforms as well as targeted platforms (e.g., aplatform built for a specific purpose, for example, such as, a platformbuilt to provide faster access by using memory instead of disk storageprovided by other platforms.

More generally, FIG. 5 depicts maps that can effectively assign data ofa database, including specific data components (e.g., tables) tocontainers (e.g., buckets) and processing units (e.g., AMPS) for variousapplications (e.g., optimizations, fault resiliency, elasticity,“software only” applications) and in consideration of desired platforms(e.g., Open Platforms, purpose-built platforms) in accordance with oneembodiment.

To elaborate even further, FIG. 6 depicts a table that can beeffectively assigned to multiple maps for various purposes and/orapplications in accordance with one embodiment. By way of example, thoseskilled in the art will appreciate that a table can be stored inmultiple maps for data protection allowing, for example, RAID alterativeor augmentation applications, fault domains, and permuted maps, etc.

FIG. 7 depicts maps that can have various states (e.g., active,inactive, on-line, offline) where the maps can be associated with asingle table or a set of tables in accordance with one embodiment. Byway of example, at a given time, a number of maps can be on-line oractive while a number of other maps can be inactive or offline. In theexample, the maps that are on-line or active can be made to beconsistent with each other as it will be appreciated by those skilled inthe art. It should also be noted that at a given time, a part of a mapmay be active or online while another part of the map can be inactive oroffline.

In addition to various states that can be assigned to map andsynchronization that can be made to ensure consistency, various otheroperations can be performed on maps. For example, the maps canassociated with one or more tables of a database.

To further elaborate, FIG. 8 depicts merger of two maps (Map 1 and Map2) that are partially offline to form a map (Map 3) that can then bebrought in its entirety or completely online in accordance with oneembodiment. By way of example, permuted maps can be merged to providenode failure resiliency in a multi-node database system. As such, mapscan be formed in a dynamic manner without having to fully shutdown adatabase system in order to reconfigure it.

It should also be noted that containers (e.g., buckets) and processingunits (e.g., AMPs) can also different states, including, for example,active, inactive, on-line and offline. FIG. 9 depicts processing units(e.g., parallel processing units) that can be online or offline at agiven time in accordance with one embodiment.

FIG. 10 depicts disjoint maps associated with different pools ofprocessing units (e.g., Parallel AMP units in a multi-node databasesystem) in accordance with one embodiment.

FIG. 11 depicts storage of tables in disjoint maps in accordance withone embodiment. Referring to FIG. 11, a relatively larger (or big) tableis stored in a first map (map 1) and a relatively smaller (or small)table is stored in another map that is a disjoint map from the firstmap, namely, a second map (map 2). It will be appreciated that theconfiguration depicted in FIG. 11 can be used for a number ofapplication provide a number of advantages, including, for example, moreefficient access to data stored in tables of a database, and hardwareacceleration.

In view of the foregoing, it will be appreciated that maps can beprovided in an intelligent manner (map intelligence). Maps provided inaccordance with one or aspects, among other things, can allow paralleldatabase systems to change dynamically and transparently. In addition,maps can be provided in a highly intelligent manner with an optimizerthat can effectively use the maps to improve the processing of databasequeries in a database system.

To elaborate still further, FIG. 12 depicts a map-aware optimizerconfigured to use multiple maps (Map₁-Map_(n)) that are associated withone or more tables in order to optimize processing of database queriesrelating to the one or more tables in a database system that stores theone or more tables in accordance with one embodiment. It should be notedthat multiple maps (Map₁-Map_(n)) can be associated with a single tableof a database.

As another example, FIG. 13 depicts processing of database queriesassociated with one or more tables in tandem (tandem queries) inaccordance with one embodiment. Referring to FIG. 13, “activeredundancy” can be achieved by processing virtually all query stepsredundantly on multiple maps (Map₁ and Map₂) as multiple processes,whereby the first process to complete can allow the query to advance. Inthis example, spools from streams that do not complete within adetermined amount of time can be abandoned. Also, “reactive redundancy”can be achieved by attempting to execute each step of a database queryin one map (e.g., Map₁) provided for one or more tables. However, incase of a failure of one or more steps of the database query, the one ormore steps can be executed using another map (e.g., Map₂) that is alsoprovided for the one or more tables. It should be noted that redundancyprovided by multiple maps can eliminate the need to restart the databasequery when there is failure. By way of example, when a node in amulti-node database system fails, an alternative node provided by analternative map can be used.

FIG. 14 depicts exemplary features associated with maps that can beprovided in accordance with one or more embodiments. FIG. 14 can alsoprovide a summary of some of the features associated with map that arenoted above. Referring to FIG. 14, as one exemplary feature, disjointedmaps can be used for purpose built platforms, all-in-one platforms andmulti-platforms. Disjointed maps can allow better database queryoptimization. Optimization can also be achieved by using map-awareoptimizers and map synchronization. Elasticity can be achieved by usingone or more exemplary features, namely, map-aware optimizers, dynamicprocessing unit (e.g., AMP) creation, map synchronization, and so on.

It should be noted that numerous operations associated with maps can beperformed in databases. For example, a new map can be created. A map canbe deleted. Maps can be merged. Maps can grow and shrink reduced insize. Maps can be activated or deactivated. Data in one map can besynchronized by data in another map. Data can be mapped to containers(e.g., buckets) using virtually any desired assignment. Similarly,containers can be assigned to processing units (e.g., AMPS) usingvirtually any desired assignment. Similarly, maps allow creation of newprocessing units (e.g., AMPS) in a database system. A processing unitcan be assigned an identifier (e.g., an Amp number). A map can becreated that includes a new processing unit *(e.g., a new AMP). A mapthat includes a particular processing unit can be deleted ordeactivated. Generally, a processing unit may appear in no maps,multiple maps, many maps, or even all the maps. A processing unit thatappears in no maps may, for example, be associated with a processingunit that is being configured or one that has been effectively removedfrom a database system. Each map can, for example, refer to a set ofprocessing units, wherein the sets may overlap partially or fully, or bedisjointed. Also, a container may exist in one more maps, may beassociated with one or more processing units.

FIG. 15 depicts an exemplary architecture for one database node 11051 ofthe DBMS 100 in accordance with one embodiment. The DBMS node 11051includes one or more processing modules 1110-N connected by a network1115, that manage the storage and retrieval of data in data-storagefacilities 11201-N. Each of the processing modules 1110-N represents oneor more physical processors or virtual processors, with one or morevirtual processors running on one or more physical processors. For thecase in which one or more virtual processors are running on a singlephysical processor, the single physical processor swaps between the setof N virtual processors. For the case in which N virtual processors arerunning on an M-processor node, the node's operating system schedulesthe N virtual processors to run on its set of M physical processors. Ifthere are four (4) virtual processors and four (4) physical processors,then typically each virtual processor would run on its own physicalprocessor. If there are eight (8) virtual processors and four (4)physical processors, the operating system would schedule the eight (8)virtual processors against the four (4) physical processors, in whichcase swapping of the virtual processors would occur. Each of theprocessing modules 11101-N manages a portion of a database stored in acorresponding one of the data-storage facilities 1201-N. Each of thedata-storage facilities 11201-N can includes one or more storage devices(e.g., disk drives). The DBMS 1000 may include additional database nodes11052-O in addition to the node 11051. The additional database nodes11052-O are connected by extending the network 1115. Data can be storedin one or more tables in the data-storage facilities 11201-N. The rows11251-z of the tables can be stored across multiple data-storagefacilities 11201-N to ensure that workload is distributed evenly acrossthe processing modules 11101-N. A parsing engine 1130 organizes thestorage of data and the distribution of table rows 11251-z among theprocessing modules 11101-N. The parsing engine 1130 also coordinates theretrieval of data from the data-storage facilities 11201-N in responseto queries received, for example, from a user. The DBMS 1000 usuallyreceives queries and commands to build tables in a standard format, suchas SQL. In one embodiment, the rows 11251-z are distributed across thedata-storage facilities 11201-N associated with processing modules11101-N, by the parsing engine 1130 in accordance with mapping data ormap (1002).

In one exemplary system, the parsing engine 1130 is made up of threecomponents: a session control 1200, a parser 1205, and a dispatcher1210, as shown in FIG. 16. The session control 1200 provides the logonand logoff function. It accepts a request for authorization to accessthe database, verifies it, and then either allows or disallows theaccess. When the session control 1200 allows a session to begin, a usermay submit a SQL request, which is routed to the parser 1205. Regardingthe dispatcher 1210, it should be noted that some monitoringfunctionality for capacity and workload management may be performed by aregulator (e.g., regulator 415). The Regulator can monitor capacity andworkloads internally. It can, for example, do this by using internalmessages sent from the AMPs to the dispatcher 1210. The dispatcher 1210provides an internal status of every session and request running on thesystem. It does this by using internal messages sent from the AMPs tothe dispatcher 1210. The dispatcher 1210 provides an internal status ofevery session and request running on the system.

As depicted in FIG. 17, the parser 1205 interprets the SQL request(block 1300), checks it for proper SQL syntax (block 1305), evaluates itsemantically (block 1310), and consults a data dictionary to ensure thatall of the objects specified in the SQL request actually exist and thatthe user has the authority to perform the request (block 1305). Finally,the parser 1205 runs an optimizer (block 1320), which generates theleast expensive plan to perform the request.

Management of Maps

As noted above with reference to FIG. 1A, an Intelligent (or open orrobust) Mapping System (IMS) 102 can perform various map relatedoperations, including, for example, creating new maps, deleting maps,growing a map, shrinking a map, merging maps, separating or dividing amap into multiple maps, activating (or bringing online) a map anddeactivating (bringing offline) a map. For example, the IMS 102 canfacilitate creation of new maps for new data and/or new processingunits, as data becomes available for storage in the database 101 and/oras new processing units are added to the database system 102. Similarly,old maps pertaining to data no longer needed and/or old maps pertainingto processing units that are to be removed from the database system 102can be deleted. As another example, maps can become active or inactiveduring a reconfiguration process in a dynamic manner allowing thedatabase system 102 to still operate with a set of active maps.

To further elaborate, FIG. 18 depicts an IMS 1800 in accordance withanother embodiment. Referring to FIG. 18, the IMS 1800 can be configuredto facilitate generation of one or more maps 1802 based on one or moreothers maps 1804. In other words, IMS 1800 can effectively reassign (ormove) data from one or maps 1804 to one or more other maps, namely oneor more maps 1802. For example, the one or more maps 1802 can be one ormore new maps and the one or more maps 1804 can be one or more existingmaps.

In the example shown in FIG. 18, one or more maps 1804 effectively mapdistinct data portions (D1-DN) of a database (also shown in FIG. 1A) toone or more processing units (P1-P1000) for processing. This mappingcan, for example, be done by using containers that map a distinct dataportion Di (e.g., a database table) to one or more of the processingunits (P1-P1000) in accordance with one or more distribution schemes(e.g., hashing, round robin, selective round robin, a single processor).In other words, assignment of one or more particular distributionschemes can be conceptually represented by a container, or a containercan be representative of one or more particular distribution schemesthat have been assigned. As such, a containers not necessary but can beused for better illustration. In effect, map 1804 can map distinct dataportions to one or more processing units for processing in accordancewith virtually any desired scheme. As such, a distinct data portion D1(e.g., a database table T1) can, for example, be mapped for processingto processing units P1-P1000 in accordance with a hashing scheme, butanother distinct data portion D2 (e.g., a database table T2) can, forexample, be mapped for processing to a single processing unit P1, andyet another distinct data portion D3 (e.g., a database table T4) can,for example, be assigned to P1, P3, P5 and P11, and so on.

As noted above, map 1804 can, for example, represent a preexisting map,but map 1802 can, for example, represent a new or a newer map that isbeing generated or has been more recently generated. Generally,generation of a map 1802 based on map 1804 can be accomplished by theIMS 1800 in a manner that would reduce or minimize the adverse effectsexperienced. For example, when a new map is generated to accommodate newdata and/or additional new processing units (e.g., P1001-P1200), it isdesirable to effectively reassign the preexisting data to take advantageof the new processing units. In the example depicted in FIG. 18, newdistinct data portion DN+1 is mapped in a map 1802 to additionalprocessing units (P1001-P1200). Although, maps 1802 and 1804 can both beused, it may be more desirable to effectively move at least some of thedata to the map 1802 for better efficiency, but this move should also bedone in a manner that would minimize adverse side effects (e.g.,unavailability of the database to users). As such, it may be desirableto move data in stages or gradually at times that may reduce adverseside effects (e.g., when the database system is not very active).However, this reassignment (or effective moving of data from map 1804 tomap 1802) can pose difficult problems given the desirability to minimizeadverse effects to the database system. Those skilled art willappreciate that in practice thousands of tables and several processingunits may be employed. Also database tables may have very complicatedrelationships in a database system that uses very complex queries withextremely complex database query plans in order to optimize databasequery execution.

Referring to FIG. 18, it will be appreciated that IMS 1800 caneffectively select a subset of distinct data portions of Map 1804 forassignment to a map 1804 in order to minimize adverse side effects. Forexample, the IMS 1800 can effectively select data portions {D1, D4, D6and D7} from map 1804 as suitable candidates for assignment to the map1802. As will described below in greater detail, this selection can bemade based on monitored data 1810. The monitored data 1810 can, forexample, represent data stored (or logged) when the database system isexecuting database queries. For example, database tables that arerelatively small can be considered relevant to “Sparse” maps and“non-small” can be relevant to “Contiguous” maps. Generally, the IMS1800 can indentify data portions of the map 1804 that are suitable forreassignment based on their relevancy to the type of the map of thetarget map, namely map 1802. In any case, the IMS 1800 can identify asubset or set of distinct data currently assigned to map 1804 forassignment in a second map 1802. For example, data portions {D1, D4, D6and D7} can be selected by the IMS 1800 based on the monitored data 1810that is representative of the executed database query plans. Forexample, database tables that may be relevant or suitable to the map1802 can be identified by the IMS 1800.

IMS 1800 can then effectively group together the data in the selectedset: data portions {D1, D4, D6 and D7} in order to identify distinctdata portions that are to be moved together to the map 1802. Forexample, the IMS 1800 may determine that distinct data portions {D1 andD7} should be moved together (or effectively at the same time) anddistinct data portions {D4 and D6} should be moved together. As anotherexample, the IMS 1800 may determine that distinct data portions {D1, D4and D6} should be moved together to the map 1802. As will be discussedin greater detail below, the IMS 1800 can, for example, determine thegroups based on a determined frequency use and/or a determined costassociated with a group of two or more distinct data portions. The IMS1800 can also consider the size relationships (e.g., strong inplacejoining relationships) between the two or more distinct data portions,as well as their size in determining the groups of distinct dataportions that should be reassigned (or effectively moved) to the map1802. For example, the IMS 1800 can be configured to recursively analyzelogged query plan operations (or phases) in the monitored data 1810 toidentify one or more specific operations (e.g., “inplace join paths).Generally, the IMS 1800 can generate a list or an ordered list ofreassigning groups, such that each one the groups has one or more dataportions.

It will also be appreciated that IMS 1800 can also be configured tofacilitate the reassignment (or effective movement) of the selected dataportions to the map 1804 in the determined groups. As such, IMS 1800 canestimate the time required to effectively move a data portion to the map1802 and identify a time for scheduling movement or reassignment of aparticular selected group to the map 1802. For example, afterdetermining that that distinct data portions {D1 and D7} should be movedtogether (or effectively at the same time) and distinct data portions{D4 and D6} should be moved together, the IMS may determine a firstsuitable time or time period to move {D4 and D6} and then a second timeor time period to move data portions {D1 and D7}. As such, the IMS 1800can, for example, facilitate moving data portions {D4 and D6} as a firstgroup at a first determined opportune time suitable for the first group,and facilitate moving data portions {D1 and D7} later, as a secondgroup, at another determined time that may be more suitable for movingthe second group. As such, the IMS 1800 can effectively provide or serveas an automated map (or mapping) tool that identify groups of dataportions of the map 1804 and facilitate their move in groups or stagesin order at times more appropriate in accordance with one or moreembodiments.

As will be described in greater detail below, the IMS 1800 can be, forexample, be provided as a Map Automation component that can include aMap Advisor component, a Map mover (or moving) component in accordancewith one or more embodiments. The IMS 1800 can also provide an analyzingcomponent that can, for example, use an “analyzing logged query plan”scheme in accordance with another embodiment, as will be described ingreater detail below. In addition, The IMS 1800 can, for example, use an“assigning tables to Groups” scheme in accordance with yet anotherembodiment, as will also be described in greater detail below.

Referring now to FIG. 19, a map management method 1900 for reassignmentof data from one map to another map in a database system is depicted inaccordance with one embodiment. It should be noted that the data can bein distinct data portions (e.g., distinct database tables) assigned to afirst map for processing by multiple processing units of a databasesystem configured to process data stored in a database. As such, themethod 1900 reassigns the data portions assigned to a first map to asecond map for processing by multiple processing units of a databasesystem configured to process data stored in a database. The method 1900can, for example, be implemented by the IMS 1800 (shown in FIG. 18). Assuch, the method 1900 can, for example, be implemented ascomputer-implemented method using one or more physical processorsconfigured to access computer executable code stored in a non-transitorycomputer storage medium. It should be noted that the first map assignseach one of the distinct data portions to one or more multipleprocessing units of a database system for processing in accordance withone or more distributions schemes (e.g., hashing, round robin, selectiveround robin). Referring to FIG. 19, a set of distinct data portionsassigned to the first map are selected (1902) for assignment (orreassignment) to the second map as selected data portions. For example,the distinct data portions can be selected at least partly based datapertaining to execution of one or more database queries. Typically, dataportions that may be suitable for reassignment are selected.

Next, multiple reassigning group for the selected data portions aredetermined (1904). A reassigning group can identifies one or more of theselected data portions from the first map for reassigned to the secondmap. Typically, at least one group of two or more data portions can beidentified as a group for reassignment to the second map. Thedetermination (1904) of the multiple groups can also be determined atleast based on data pertaining to execution of one or more databasequery plans (e.g., execution plans that have used the first map and/orthe second map). The determination (1904) of the multiple groups canalso take into consideration the relationships between two or more ofthe selected data portions in view of the data pertaining to executionof one or more database query plans. In addition, the determination(1904) of the group(s) can also be made at least partly based on thenumber of times that two or more of the selected data portions (e.g.,selected databases tables) have been involved in one or more particulardatabase operations (e.g., join operations) needed to execute one ormore database query plans and/or the cost associated with performing oneor more database operations performed in relation to the two or more ofthe selected data portions in order to execute one or more databasequery plans that have used the two or more of the selected dataportions. For example, logged query plan operations can be recursivelyanalyzed to identify “inplace join” paths associated with the two ormore of the selected database table and the database tables can beassigned to groups to perverse the dominant query level join paths, aswill be discussed in greater detail below. Management method 1900 endsafter the reassigning groups are determined (1904).

Although not shown in FIG. 19, it should be noted that monitoring ofdatabase query execution plans can optionally be performed as a part ofthe map management method 1900. In addition, reassignment or movement ofdata can also be optionally performed as part of the map managementmethod 1900 (not shown). For example, a first group and a second groupcan be indentified for reassignment to the second map, such that eachone of the first and a second groups identifies one or more dataportions selected for reassignment. In addition, optionally, as a partof the map management method 1900, a first time or first time period forreassigning the first group from a first map to a second map can bedetermined and scheduled. This determination can, for example, be madebased on more or more of the following: the size of the data portions ofthe first group, the time needed to reassign the first group, and adetermined workload of the database system. Similarly, a second time orsecond time period for reassigning the one or more data portions of asecond group of data portions (e.g., database tables) from the first mapto the second ma can be determined and facilitated as a part of the mapmanagement method 1900.

To elaborate even further, additional exemplary embodiment are furtherdescribed below in sections: “Map Management Automation, “Map Advisor,”“Analyzing Logged Query Plans,” and assigning tables to groups.

Other sections provide yet additional embodiments reassigning group forthe selected data portions is determined (1904).

Other additional sections describe yet additional embodiments that can,for example, be provided by a IMS 1800 to manage “Sparse” tables, selectdata for reassignment to new processing units, and moving data in aparticular time window.

Map Management Automation

In accordance with one or more embodiments, one or more automated toolscan be provided. The automated tools can be designed, for example, toassist users with moving tables to newly defined maps that were createdas part of a recent system expansion (or contraction). As such, AnAdvisor tool can recommend groups of related user tables to movetogether from their existing map to a new map with the goal ofpreserving efficient query execution plans. A Mover tool can coordinateand executes the actions for moving table data to a new map and canaccept Advisor output recommendations as its input. These tools can, forexample, be implemented by a set of Teradata-supplied stored proceduresthat represent an open API that can be called directly by customerscripts or Teradata clients, such as Viewpoint.

The main database system (DBS) components for these tools can, forexample, include:

-   -   A new system database TDMaps that stores metadata for the        automated management of maps along with results from procedure        calls.    -   Advisor procedures capable of analyzing user objects and logged        query plans to make recommendations for moving a set of tables        onto a caller specified contiguous or sparse map. The output        recommendations can optionally be customized by callers and then        input to the Mover.    -   Mover procedures capable of moving the data for a specified list        of tables to new maps using the ALTER TABLE statement with a MAP        clause. Multiple worker sessions can be used to achieve the        desired level of concurrency. A single manager session monitors        the worker sessions and enforces any user-specified time limit.    -   Database Query Logging (DBQL) options whose metadata provides        information about query plan steps and the tables they reference        which in turn provides the necessary input to Advisor.

The example below demonstrates the operations (1-5) a user would performin using procedures) (e.g., TDMaps procedures) to expand their systemonto a newly created map. For the sake of this example, assume thefollowing map has recently been created as part of a system expansion:

SHOW MAP TD_Map2;

-   -   CREATE MAP TD_Map2    -   CONTIGUOUS    -   AMPCOUNT=400    -   AMP BETWEEN 0 AND 399;        1. Enable step level Query Logging in preparation for calling        the Map Advisor. Leave logging enabled for 7 days which is        sufficient to capture a set of queries that are representative        of the workload for this particular system.

BEGIN QUERY LOGGING WITH STEPINFO ON FOR ALL;

2. Call an Advisor procedure to analyze the last 7 days in the query logand generate a recommended list of actions for moving selected tables(Alter action) into TD_Map2 while potentialy excluding others due totheir small size.

CALL TDMaps.AnalyzeSP

(‘TD_Map2’,

-   -   CURRENT_DATE—INTERVAL ‘7’ day,    -   ‘MyMoveTableList’); /* user assigned name of generated actions        list */        Examine the Advisor results by querying a table in TDMaps. Those        actions with the same value in output column GroupOrder are in        the same group.        SELECT Action, DatabaseName, TableName, GroupOrder        FROM TDMaps.ActionsTbl        WHERE ActionListName=‘MyMoveTableList’;        ORDER BY 1, 4, 3, 2;

Action DatabaseName TableName GroupOrder Alter db2 JoinTab1 1 Alter db2JoinTab2 1 Alter db2 OtherTab 2 Alter db1 LargeTab 3 Alter db1 MediumTab3 Exclude db1 TinyTab NULL Exclude db2 SmallTab NULL Exclude db3SmallToMediumTab NULL3 (Optional) User customizes the Advisor recommended actions byincluding table ‘SmallToMedium’ in the list of tables identified forexpansion and lowering the moving priority of ‘OtherTab’.UPDATE TDMaps.ActionsTbl

-   -   SET GroupOrder=4

WHERE DatabaseName=‘db2’ AND TableName=‘OtherTab’

-   -   AND ActionListName=‘MyMoveTableList’;        UPDATE TDMaps.ActionsTbl    -   SET Action=‘Alter’, GroupOrder=5

WHERE DatabaseName=‘db3’ AND TableName=

‘SmallToMediumTab’

-   -   AND ActionListName=‘MyMoveTableList’;        4. Call Mover procedures with 2 workers to move the tables in a        group-at-a-time fashion and specify a time limit of 12 hours        (720 minutes).    -   Session #1        CALL TDMaps.ManageMoveTablesSP(‘MyMoveTableList’, 720);    -   Session #2        CALL TDMaps.MoveTablesSP( );    -   Session #3        CALL TDMaps.MoveTablesSP( );        5. Monitor the progress from the Mover operation in 4.        SELECT Status, DatabaseName, Group, TableName, StartTime,        Endtime        FROM TDMaps.ActionHistoryTbl        WHERE ActionListName=‘MyMoveTableList’ AND Action=        ‘Alter’        ORDER BY 1, 5, 4;

Database Table Status Name Name Group StartTime EndTime Complete db2JoinTab1 1 Oct. 1, 2014 Oct. 1, 2014 6:00 AM 7:20 AM Complete db2JoinTab2 1 Oct. 1, 2014 Oct. 1, 2014 6:00 AM 7:30 AM In Progress db1MediumTab 3 Oct. 10, 2014 7:21 AM In Progress db1 LargeTab 3 Oct. 10,2014 7:31 AMMap Advisor

An Advisor tool can perform the following major tasks:

-   -   Determine which tables in the caller specified object scope are        relevant to the specified target map kind and exclude those that        are not. In general, “small” tables are relevant to Sparse maps        and “non-small” tables are relevant to Contiguous maps.    -   Estimate the elapsed time required to move each table to the        target map using an ALTER TABLE statement. Such time estimates        are needed by Mover stored procedures who must schedule move        actions based on user specified time limits.    -   Organize the qualifying tables to be moved into suitably sized        Groups that represent tables with strong inplace joining        relationships. Tables within a group will be queued together for        movement by Mover stored procedures thereby limiting the        duration in which they reside on different maps and in turn        limiting the potential disruption to inplace join steps.    -   Prioritize the order in which Groups and tables within Groups        should be moved.

Summarized below are the major processing operations that complete thosetasks.

1) Estimate table size using current perm space figures stored in thedata dictionary. The criteria for “small” are based on the estimated#data blocks relative to the number of Amps in the Map.

2) Estimate elapsed times for individual ALTER TABLE move actions.Separate methods are employed, namely one that is EXPLAIN Optimizerbased while another multiplies a cost coefficient to the number of bytesin the table where the cost coefficient is measured by first performingsmall sample move operations. The more conservative estimate is chosenunder the assumption that it's better to overestimate and finish withinthe estimated time rather than the opposite.

3) Recursively analyze logged query plan steps to identify inplace joinpaths. Query log data describing the source tables and target spools foreach Join step is read for the caller specified logged time period. Foreach logged query, the sets of tables involved in consecutive inplacejoin steps are identified and then aggregated across all queries torecord frequency and aggregate join cost.

This solution requires input in the form of step level query loggingthat has been performed for a period of time prior to system expansionand the creation of new maps. Each logged row entry represents anindividual execution step within a multi-step query plan along with datadescribing its input relation(s), output spool file, and theirassociated storage geographies. Identifying tables involved in inplacejoin steps requires an examination of all steps that perform a joinoperation and the input paths leading to that step which can consist ofany number of single table Retrieve steps, Aggregate, or Join stepsalong with target spool geographies of type Local materialized, Hashredistributed, or Duplicated.

Query plans involving join steps are conceptually organized as binarytrees where the target output of each child step is the source input toits parent step with the overall tree shape being left-deep, right deep,bushy, or any combation thereof. The full input path for any given joinstep consists of all child steps down to the leaf level where the basetable data is initially retrieved. Our solution generates the full inputpath by performing a recursive SQL query that joins a step's inputsource identifiers with the matching target output identifiers of therelevant child steps. For each step along the path, the geography of itsoutput and it's cost is recorded.

4) Assign tables to Groups to preserve the dominant query level inplacejoin paths. The primary factor in deciding how to group together sets oftables for scheduled movement to a new target map is the identificationof those tables that are frequently involved in costly inplace joinpaths. This includes consecutive binary join steps whose intermediateresults are materialized inplace within temporary spool files. By movingsuch tables together as a group within the same move operation, theduration in which performance is degraded from disrupting their inplacejoins is minimized.

The initial candidate table groups are formed from the query levelinplace join paths from step 3. The distinct candidate groups are thenranked according to their workload frequency and inplace join cost as ameans to prioritize groups and eliminate duplicate (common) tables amonggroups. A given table belonging to two or more candidate groups isassigned to the highest priority group that it is a member of:GroupRank=RANK( )OVER (ORDER BY (WF*JoinFrequency+WC*JoinCostMagnitude)DESC).

The intent of the ranking formula is to favor those table sets with highfrequencies and high join costs. Inplace join steps are inherently anefficient operation relative to a non-inplace operation on the samedata. Hence, an expensive inplace operation would be even more costly ifan uncoordinated movement of its inputs to different maps were to takeplace. Put another way, the most expensive inplace join steps are themost important ones to try and preserve. In the ranking formula above,JoinCostMagnitude is the number of digits in the average per-query costfor performing inplace join steps on the given table set. The cost willbe represented in seconds and the corresponding number of digits shouldnormally range from 1 to 6 (999999=278 hours). Factors WF and WC in theabove formula are configurable weighting factors whose default valuesare 1.0.

This solution recognizes there is a tradeoff in the average size offormed groups (# table members). Larger groups have the advantage ofensuring that all related joining tables are processed together in agiven queued move operation. On the other hand, large groups make itmore difficult for the Mover tool to schedule and finish entire groupswithin a user specified time window (e.g., 3 hours). Having more“pauses” or “breaks” between the scheduled movement of smaller groupsgives the Mover more decision points to monitor how much time is leftand avoid going over the time limit. In general, performing a body ofwork in smaller chunks provides the best opportunity to maximize thetotal amount of work done while still adhering to time limits.

To maximize the benefits from this tradeoff, the Advisor chooses finalgroup from among query level candidates rather than attempting to takethe union of groups having common table members from different queries.For example, given query level candidate table groups {t1,t2,t3} and{t3,t4,t5}, the Advisor will choose final groups {t1,t2,t3} and {t4,t5}assuming the frequency and join cost of {t1,t2,t3} is greater that{t3,t4,t5}. It will not consider {t1,t2,t3,t4,t5} because its unionedsize is considered to be too large in the context of the tradeoffsdiscussed above.

5) Prioritize tables within Groups based on table size such that thelargest tables are given priority when moving to Contiguous maps and thesmallest tables are given priority when moving to Sparse maps.

6) Populate table TDMaps.ActionsTbl with rows representing an Alter orExclude action on each table analyzed by the Advisor call. Insert valuesfor the calculated table size (from step 1), estimated time to move(from step 2), group order (from step 4), and table/action order (fromstep 5) in the appropriate columns.

Analyzing Logged Query Plans

The first operation in identifying tables involved in inplace join stepsis to query the DBQL tables for qualifying STEP INFO logging data basedon caller specified inputs including Log StartTime, Log Endtime andDatabaseScope. In addition, the caller specifies if the DBQL dataresides in DBC or an exported log database such as PDCRDATA.

In the SQL query depicted in FIG. 20A, tables prefixed with VT_ areVolatile temporary tables used to hold intermediate results. Tablefunction SYSLIB. DBQLStepObjInfo is used to extract and expand thebinary object data residing in column DBC.QryLogStepsV.StepObjectInfo.

In the SQL query depicted in FIG. 20A, tables prefixed with VT_ areVolatile temporary tables used to hold intermediate results. Tablefunction SYSLIB. DBQLStepObjInfo is used to extract and expand thebinary object data residing in column DBC.QryLogStepsV.StepObjectInfo.

The query depicted in FIG. 20A retrieves object and geography data foreach individual RET and JOIN step within each logged query. A recursivequery (WITH RECURSIVE clause) as shown below in FIG. 20B is then used togenerate the input source paths for each join step along with spoolgeographies.

All of the full or “leaf” join paths (those whose inputs are ultimatelybase tables) are then aggregated and any involving non-inplace inputgeographies are marked using the query depicted in FIG. 20C.

Example

Assume that DBQL STEPINFO logging occurred on the following two loggedquery plans. In the EXPLAIN-like notation below, left arrows represent awrite/sink operation on a target spool whose geography is shown inparentheses. Asterisks denote a join step whose inputs involve inplace(Local) data. Note that Table names rather than Table Ids are used tomake the example easier to follow.

Logged query #1 is a 4-way join where each binary join step operates oninplace input. It's set of inplace join tables consist of: {T1,T2},{T3,T4}, {T1,T2,T3,T4}, and {T1,T2,T3,T3,T5}. Although some are subsetsof larger sets, each is separately recorded because their aggregatedfrequencies across the workload may differ. For example, there may bemany queries with an inplace binary join involving {T1,T2} but only afew that have the full 4-way inplace join involving all 5 tables.

1.1 RET T1→Spool_1 (Local)

1.2 RET T2→Spool_2 (Local)

2. Spool_1 JIN* Spool_2→Spool_3 (Local)

3. T3 JIN* T4→Spool_4 (Local)

4. Spool_3 JIN* Spool_4→Spool_5 (Local)

5. Spool_5 JIN* T5→Spool_6 (Response final)

Logged query #2 is another 4-way join but a portion of its binary joinsteps operate on inputs that were hash redistributed. It's set ofinplace join tables consists of: {T1,T2} and {T3,T4}

1.1 RET T1→Spool_1 (Local)

1.2 RET T2→Spool_2 (Local)

2. Spool_1 JIN* Spool_2→Spool_3 (Hash redistributed)

3. T3 JIN* T4→Spool_4 (Local)

4. Spool_3 JIN Spool_4→Spool_5 (Local)

5. Spool_5 JIN T5→Spool_6 (Response final)

Temporary table VT_StepObectInfo would consist of the following rowsafter performing the initial query that reads data from the DBQL tables,as depicted in FIG. 20D.

After executing the Recursive query on the data in VT_StepObjectInfo,the results in temporary table VT_join_inputs would be as depicted inFIG. 20E.

After executing the aggregate query on the data in VT_join_inputs, theresults in temorary table VT_inplace_join_tables would be as depicted inFIG. 20F. These results represent sets of 2 or more tables thatparticipate in inplace join steps.

These query level results are then aggregated to form the set ofdistinct table sets along with their SUM frequency and AVG per querystep costs:

{T1,T2} with Freq=2, AvgQueryCost=35

{T3,T4} with Freq=2, AvgQueryCost=50

{T1,T2,T3,T4} with Freq=1, AvgQueryCost=100

{T1,T2,T3,T4,T5} with Freq=1, AvgQueryCost=120

Assigning Tables to Groups

The operations in forming and prioritizing groups can include (i) Formthe initial groups from the query-level inplace join paths, (ii) Rankthe groups by workload frequency and average join step cost, andTraverse ranked list from top to bottom and remove duplicate tableentries.

The preceding section applied a recursive query to DBQL data todetermine sets of two (2) or more tables involved in consecutive inplacejoin steps. It then aggregated these results to form distinct sets alongwith frequencies and average per query cost. These table sets form theinitial set of candidate groups for our algorithm as they represent thesmallest groups that are still capable of preserving a series ofconsecutive inplace join steps for individual queries. The size of thesegroups is assumed to represent the “sweet spot” in the table sizetradeoff discussed earlier.

Because these table sets represent inplace join paths from differentqueries across the workload, the same table will often appear inmultiple groups. For example, T1 may be joined with T2 in certainqueries whereas it's joined with T3 (and not T2) in other queries.Because each table should only be moved once by a given Mover procedurecall, the union of the final sets cannot have duplicates. In order todetermine which set a particular table should be assigned to, in (ii) werank the candidate sets by the following weighted formula expressed inSQL. Each table will then be assigned to the highest ranking group thatit is a member of:GroupRank=RANK( )OVER(ORDERBY(WF*JoinFrequency+WC*JoinCostMagnitude)DESC).

In the ranking formula above, JoinCostMagnitude is the number of digitsin the average per-query cost for performing inplace join steps on thegiven table set. The cost will be represented in seconds and thecorresponding number of digits should normally range from 1 to 6(999999=278 hours). Factors WF and WC in the above formula areconfigurable weighting factors whose default values are 1.0.

(iii) then traverses the ranked groups from highest to lowest ranked andremoves any tables in the current group that have already been assignedto a previously traversed group. The ranking of groups that have tablesremoved is not changed in order to preserve the importance of thejoining relationship with the table that was reassigned to a higherranked group. Under this paradigm, a lower ranked group may lose one ofits member tables but it will retain its relative ordering among othergroups.

Certain tables may not be involved in any logged inplace join operationsand thus their frequency and step cost will be zero. Such sets arereferred to as “loners” and will be ranked lower than all other setsthat have inplace joins. Among loners, those with a larger estimatedtable size will be ranked higher under the assumption that larger tableswill benefit more from moving to a large map (system expansion). It isalso possible for loners to exist after duplicates are removed duringStep 3 although as note above such reduced sets retain their originalranking.

If the DestinationMap specified in the call to Advisor stored procedureis of type Sparse, all non-excluded tables that are being processed inthis step are assumed to “small”. To promote inplace joins, every tablein each group is assigned a common system generated COLOCATE USING name.

The Advisor stored procedure accepts an optional caller specifiedGroupTimeLimit which represents a maximum time for moving all of thetables in a given group. The grouping algorithm will only use thisparameter to flag those groups whose combined time exceeds this limit. Asuitable warning message will be included in the row stored inTDMaps.ActionsTbl.Description for such groups. Any corrective actionthat involves breaking up and reducing the size of recommended groupswill be left to the user who has the option of overriding allrecommended groups prior to their submission to Mover stored procedures.No automated action is attempted because the algorithm is inherentlydesigned to recommend the smallest groups possible while stillaccomplishing its primary goal.

Example

Assume the query level table sets shown in FIG. 20G have been generatedby the recursive query logic described in the preceding section alongwith aggregated workload level frequencies and average per-query joinstep costs. FIG. 20G shows the weighted formula calculation for eachgroup along with the associated Group Rank. FIG. 20H shows the Groupsafter removing duplicates which in turn are the final recommendedgroups.

Sparse Maps (Spare Database Tables)

In a large database systems (e.g., data warehouses) database tables canbe stored on many different processors (e.g., AMPs). For efficiency, thedata in a database table can be evenly distributed among all theprocessors. In this way, each processor can have about the same work todo. For tables with a small amount of data many processors may have nowork to do.

It will be appreciated, the number of processors that store data can toimprove efficiency, in accordance with one aspect. In one embodiment, asparse map can be provided for sparse database tables (or tables). Forexample, a sparse map can be created with a syntax:

CREATE MAP FourAMPMap

-   -   FROM TD_Map1    -   AMPCOUNT=4;

The map can be used like other maps in a CREATE TABLE syntax:

CREATE TABLE Tab1, MAP=FourAMPMap (C1_INT, C2_INT)

The database assigns 4 processors (AMPs) to store the table on from allof the processors available in TD_Map1. No work is required by theadministrator to choose which four processors to store the table on. Theprocessors are chosen in a manner to distribute the work across all ofthe AMPs and nodes. First, a processor list based on TD_Map1 is built todistribute the processors across the nodes in the same relative manner.For example, suppose map TD_Map1 contains 100 AMPs in 4 nodes with 25AMPs per node. The first node has AMPs 0 through 99, the second 100through 199, etc. The processor list is built as follows: 0, 25, 50, 75,1, 26, 51, 76, 2, 27, 52, 77, 3 . . . 99. The pattern for the list ofprocessors is based on the number nodes. Two items are needed to choosethe actual AMPs to store the data one: a starting index and a number ofAMPs. For example, suppose the starting index is 2 and the number ofAMPs is 4, then the AMPs chosen are 50, 75, 1, and 26.

If more than one small table are joined together using the same primaryindex in the same sparse map, then the following mechanism is used tochoose the same four processors from all of TD_Map1. The two itemsneeded to choose the processors are the starting index and number ofAMPs. The number of AMPs is the same since both tables are in the samesparse map. So, the only thing needed is the same starting index. Thestarting index is chosen by hashing on a string using the hash map ofthe parent map, TD_Map1. This gives a starting index between 0 and 99.The string is formed by combining two collocation names. These names areoptionally specified in the CREATE TABLE syntax:

CREATE TABLE Tab1, MAP=FourAMPMap

-   -   COLOCATE USING Name1.Name2    -   (C1 INT, C2 INT);

If the COLOCATE USING clause is not given, then Name1 defaults to thedatabase name for Tab1 and Name2 defaults to Tab1.

It should be noted that tables in sparse maps can also support fallbackprotection. This can, for example, be done by simply using one of theAMPs in the fallback cluster for each AMP the table is defined to have.

Choosing Tables to Move to Newly Available Processors

In a large database systems (e.g., data warehouses) database tables canbe stored on many different processors (e.g., AMPs). For efficiency, thedata in a database table can be evenly distributed among all theprocessors. In this way, each processor can have about the same work todo. After new processing and storage capacity is added portions oftables should be moved to the new processors. But, not all tables needto be moved at the same time. And, some tables should be moved together.It will be appreciated that tables can be selected to be moved togetherin an effect manner, in accordance with one

A good first approximation of which tables to move can be based on thesize of the table (table size). That is, the larger the table the morebenefit it gets from the extra processing. Besides ordering the tablesbased on size, some tables should be moved together. Tables that shouldbe moved together can be tables which are joined together and have therows they need to join already on the same processors: in-place joins.To determine which tables have in-place join relationships, the type ofjoin is logged in the query logging tables. A recursive query is used toanalyze the logged query data to generate input source paths.

For example a logged query is a 4-way join where each binary join stepoperates on in-place input. It's set of in-place join tables consist of:{T1,T2}, {T3,T4}, {T1,T2,T3,T4}, and {T1,T2,T3,T3,T5}. Although some aresubsets of larger sets, each is separately recorded because theiraggregated frequencies across the workload may differ. For example,there may be many queries with an in-place binary join involving {T1,T2}but only a few that have the full 4-way inplace join involving all 5tables.

1.1 RET T1→Spool_1 (Local)

1.2 RET T2→Spool_2 (Local)

2. Spool_1 JIN* Spool_2→Spool_3 (Local)

3. T3 JIN* T4→Spool_4 (Local)

4. Spool_3 JIN* Spool_4→Spool_5 (Local)

5. Spool_5 JIN* T5→Spool_6 (Response final)

The query level results are then aggregated to form the set of distincttable sets along with their SUM frequency and AVG per query step costs

There is a tradeoff in the average size of formed groups (# tablemembers). Larger groups have the advantage of ensuring that all relatedjoining tables are processed together in a given move operation. On theother hand, large groups make it more difficult to schedule and finishan entire group within a specified time window. In general, performing abody of work in smaller chunks provides the best opportunity to maximizethe total amount of work done while still adhering to time limits. Forthese reasons, the grouping technique can favor smaller groups.

The following are the major steps in forming and prioritizing groups:

(1)—Form the initial groups from the query-level in-place join paths

(2)—Rank the groups by workload frequency and average join step cost

(3)—Traverse ranked list from top to bottom and remove duplicate tableentries

(4)—(Optionally) Identify and report those groups whose estimated timesexceed the caller specified group time limit (informational purposesonly).

A recursive query can be applied to DBQL data to determine sets of twoor more tables involved in consecutive inplace join steps. It thenaggregated these results to form distinct sets along with frequenciesand average per query cost. These table sets form the initial set ofcandidate groups for our algorithm as they represent the smallest groupsthat are still capable of preserving a series of consecutive inplacejoin steps for individual queries. The size of these groups is assumedto represent the “sweet spot” in the table size tradeoff discussedearlier. Because these table sets represent in-place join paths fromdifferent queries across the workload, the same table will often appearin multiple groups. For example, T1 may be joined with T2 in certainqueries whereas it's joined with T3 (and not T2) in other queries.Because each table should only be moved once, the union of the finalsets cannot have duplicates. In order to determine which set aparticular table should be assigned to, in (2) we rank the candidatesets by the following weighted formula. Each table will then be assignedto the highest ranking group that it is a member of:GroupRank=RANK( )OVER(ORDERBY(WF*JoinFrequency+WCJoinCostMagnitude)DESC).

The intent of the ranking formula is to favor those table sets with highfrequencies and high join costs. In-place join steps are inherently anefficient operation relative to a non-inplace operation on the samedata. Hence, an expensive in-place operation would be even more costlyif an uncoordinated movement of its inputs to different maps were totake place. Put another way, the most expensive in-place join steps arethe most important ones to try and preserve. In the ranking formulaabove, JoinCostMagnitude is the number of digits in the averageper-query cost for performing inplace join steps on the given table set.The cost will be represented in seconds and the corresponding number ofdigits should normally range from 1 to 6 (999999=278 hours). Factors WFand WC in the above formula are configurable weighting factors whosedefault values are 1.0.

(3) then traverses the ranked groups from highest to lowest ranked andremoves any tables in the current group that have already been assignedto a previously traversed group. The ranking of groups that have tablesremoved is not changed in order to preserve the importance of thejoining relationship with the table that was reassigned to a higherranked group. Under this paradigm, a lower ranked group may lose one ofits member tables but it will retain its relative ordering among othergroups.

some tables may not be involved in any logged in-place join operationsand thus their frequency and step cost will be zero. Such sets arereferred to as “loners” and will be ranked lower than all other setsthat have inplace joins. Among loners, those with a larger estimatedtable size will be ranked higher under the assumption that larger tableswill benefit more from moving to a large map (system expansion). It isalso possible for loners to exist after duplicates are removed during(3) although as note above such reduced sets retain their originalranking.

Mover Time Limit

In a large database systems (e.g., data warehouses) database tables canbe stored on many different processors (e.g., AMPs). For efficiency, thedata in a database table can be evenly distributed among all theprocessors. In this way, each processor can have about the same work todo. After new processing and storage capacity is added portions oftables should be moved to the new processors. Not all tables need to bemoved at the same time but some tables should be moved together. It willbe appreciated that it can be determined which tables should be moved ina given maintenance window, in accordance with one aspect.

Assuming that the tables have been already grouped together and orderedby their importance. The input list can be taken as input to move asmany groups of tables as possible in a given maintenance window. Animportant factor cab be how long it will take to move a group of tables.

The time to move a group of tables can, for example, be determined bythe following:Time=NumOfBytes*BytesPerSecondEstimate*FixedAdjustment*DynamicAdjustmentwhere NumOfBytes is the number of bytes in the table, andBytesPerSecondEstimate is an estimate of how long it takes to move atable. This estimate is calculated by comparing an explain of the movewith an experiment for a typical table. The longer estimate can bechosen. FixedAdjustment can be an optionally site-specific adjustment.DynamicAdjustment can be an adjustment that considers how long aprevious move took in the maintenance window compared with its estimate.This adjustment tries to compensate for system load.

At the start of the maintenance window the ordered input list of groupsof tables is checked. Using the above formula the first group of tablesthat fits in the maintenance window is deleted from the ordered list andinserted into a queue table. Then, however many sessions the sitewishes, removes the table names from the queue table and modifies thetable to use the new processors. When all of the tables in the grouphave been moved, the next group of tables that fit in the remaining timeis deleted from the ordered list and inserted into a queue table. Thiscan continue until no more groups of tables fit in the remaining time.

Generally, various aspects, features, embodiments or implementations ofthe invention described above can be used alone or in variouscombinations. Furthermore, implementations of the subject matter and thefunctional operations described in this specification can be implementedin digital electronic circuitry, or in computer software, firmware, orhardware, including the structures disclosed in this specification andtheir structural equivalents, or in combinations of one or more of them.Implementations of the subject matter described in this specificationcan be implemented as one or more computer program products, i.e., oneor more modules of computer program instructions encoded on a computerreadable medium for execution by, or to control the operation of, dataprocessing apparatus. The computer readable medium can be amachine-readable storage device, a machine-readable storage substrate, amemory device, a composition of matter affecting a machine-readablepropagated signal, or a combination of one or more of them. The term“data processing apparatus” encompasses all apparatus, devices, andmachines for processing data, including by way of example a programmableprocessor, a computer, or multiple processors or computers. Theapparatus can include, in addition to hardware, code that creates anexecution environment for the computer program in question, e.g., codethat constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, or a combination of one or moreof them. A propagated signal is an artificially generated signal, e.g.,a machine-generated electrical, optical, or electromagnetic signal thatis generated to encode information for transmission to suitable receiverapparatus.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a standalone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, subprograms, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto-optical disks, or optical disks. However, a computerneed not have such devices. Moreover, a computer can be embedded inanother device, e.g., a mobile telephone, a personal digital assistant(PDA), a mobile audio player, a Global Positioning System (GPS)receiver, to name just a few. Computer readable media suitable forstoring computer program instructions and data include all forms ofnonvolatile memory, media and memory devices, including by way ofexample semiconductor memory devices, e.g., EPROM, EEPROM, and flashmemory devices; magnetic disks, e.g., internal hard disks or removabledisks; magneto optical disks; and CDROM and DVD-ROM disks. The processorand the memory can be supplemented by, or incorporated in, specialpurpose logic circuitry.

To provide for interaction with a user, implementations of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech,tactile or near-tactile input.

Implementations of the subject matter described in this specificationcan be implemented in a computing system that includes a backendcomponent, e.g., as a data server, or that includes a middlewarecomponent, e.g., an application server, or that includes a frontendcomponent, e.g., a client computer having a graphical user interface ora Web browser through which a user can interact with an implementationof the subject matter described in this specification, or anycombination of one or more such backend, middleware, or frontendcomponents. The components of the system can be interconnected by anyform or medium of digital data communication, e.g., a communicationnetwork. Examples of communication networks include a local area network(“LAN”) and a wide area network (“WAN”), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specifics, these should not beconstrued as limitations on the scope of the disclosure or of what maybe claimed, but rather as descriptions of features specific toparticular implementations of the disclosure. Certain features that aredescribed in this specification in the context of separateimplementations can also be implemented in combination in a singleimplementation. Conversely, various features that are described in thecontext of a single implementation can also be implemented in multipleimplementations separately or in any suitable sub-combination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asub-combination or variation of a sub-combination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

The various aspects, features, embodiments or implementations of theinvention described above can be used alone or in various combinations.The many features and advantages of the present invention are apparentfrom the written description and, thus, it is intended by the appendedclaims to cover all such features and advantages of the invention.Further, since numerous modifications and changes will readily occur tothose skilled in the art, the invention should not be limited to theexact construction and operation as illustrated and described. Hence,all suitable modifications and equivalents may be resorted to as fallingwithin the scope of the invention.

What is claimed is:
 1. A computer-implemented method of reassigning data portions assigned to a first map to a second map for processing by multiple processing units of a database system configured to process data stored in a database, wherein the computer-implemented method is implemented by one or more physical processors configured to access at least computer executable code stored in a non-transitory computer storage medium, and wherein the computer-implemented method comprises: selecting a set of the distinct data portions assigned to the first map for assignment to the second map as selected data portions, wherein the first map assigns each one of the distinct data portions to one or more multiple processing units of the database system for processing in accordance with one or more distributions schemes; and determining multiple reassigning groups for the selected data portions, wherein at least one the reassigning groups identifies two or more of the selected data portions from the first map for reassigning together as a group to the second map.
 2. The computer-implemented method of claim 1, wherein the selecting selects the distinct data portions assigned to the first map at least partly based data pertaining to execution of one or more database query plans that have used the first map and/or second map.
 3. The computer-implemented method of claim 1, wherein the determining of the at least one reassigning group for the selected data portions is determined at least partly based on the relationship between two or more of the selected data portions.
 4. The computer-implemented method of claim 1, wherein the determining of at least one reassigning group for the selected data portions is determined at least partly based on one or more of the following: number of times two or more of the selected data portions have been involved in one or more database operations needed to execute one or more database query plans that have used the two or more of the selected data portions; and cost associated with performing one or more data operations performed in relation to the two or more of the selected data portions in order to execute one or more database query plans that have used the two or more of the selected data portions.
 5. The computer-implemented method of claim 4, wherein the determining of at least one reassigning group for the selected data portions is determined at least partly based on determining frequencies and aggregated join costs associated with the performing of the one or more data operations performed in relation to the two or more of the selected data portions.
 6. The computer-implemented method of claim 5, wherein each one of the distinct data portions includes a database table of the database, and wherein the computer implemented method further: recursively analyzing logged query plan operations to identify inplace join paths associated with the two or more of the selected database tables; and assigning database tables to groups to perverse the dominant query level join paths.
 7. The computer-implemented method of claim 5, wherein he second map is a relatively newer map than the first map.
 8. The computer-implemented method of claim 1, wherein the multiple reassigning groups include first and a second reassigning groups to be reassigned to the second map, and wherein each one of the first and a second groups identifies one or more of the selected data portions; and wherein the computer-implemented method further comprises: determining a first time or a first time period for reassigning the one or more data portions of the first group from the first map to the second map.
 9. The computer-implemented method of claim 8, wherein the determining of the first time or the first time period is made at least partly based on more or more of the following: the size of the data portions of the first group, the time needed to reassign the first group, and a determined workload of the database system.
 10. The computer-implemented method of claim 9, wherein the computer-implemented method further comprises: determining a second time or second time period for reassigning the one or more data portions of the second group from the first map to the second map.
 11. The computer-implemented method of claim 9, wherein the computer-implemented method further comprises: facilitating reassignment of the first group at the first time or during the first time period.
 12. The computer-implemented method of claim 1, wherein the computer-implemented method further comprises: monitoring database query execution plans.
 13. A device comprising: one or more physical processers configured to: execute computer executable code stored in a non-transitory computer storage medium; select a set of the distinct data portions assigned to a first map for assignment to a second map as selected data portions, wherein the first map assigns each one of the distinct data portions to one or more multiple processing units of a database system for processing in accordance with one or more distributions schemes; and determine multiple reassigning groups for the selected data portions, wherein at least one the reassigning groups identifies two or more of the selected data portions from the first map for reassigning together as a group to the second map.
 14. A non-transitory computer readable medium storing at least computer readable executable code that when executed: selects a set of the distinct data portions assigned to a first map for assignment to a second map as selected data portions, wherein the first map assigns each one of the distinct data portions to one or more multiple processing units of a database system for processing in accordance with one or more distributions schemes; and determines multiple reassigning groups for the selected data portions, wherein at least one the reassigning groups identifies two or more of the selected data portions from the first map for reassigning together as a group to the second map. 